home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- imageio.library/--background--
- imageio.library/--history--
- imageio.library/_base64
- imageio.library/_datatype
- imageio.library/_gif
- imageio.library/_Ilbm
- imageio.library/_jpeg
- imageio.library/_memory
- imageio.library/_Superview
- imageio.library/_Tbcplus
- imageio.library/_uu
- imageio.library/AllocImageA
- imageio.library/FreeImage
- imageio.library/GetAvailWriteFormat
- imageio.library/GetImageAttrsA
- imageio.library/GetImageTypeArray
- imageio.library/ReadImageA
- imageio.library/SetImageAttrsA
- imageio.library/WriteImageA
- imageio.library/--background-- imageio.library/--background--
-
- PURPOSE
- To allow the reading/writing of multiple image formats.
-
- COPYRIGHT
- The copyright in this library is owned by Paul Huxham.
-
- DISCLAIMER
- imageio.library and its associated files are supposed to enable the
- reading of different file formats. Even though every effort has been
- made to make imageio.library as stable and functional as possible, I
- cannot rule out the possibility that imageio.library may have bugs that
- have side effects (possibly harmful) on your system.
-
- I hereby reject any liability or responsibility for these or any other
- consequences from the use of imageio.library whatsoever. This includes,
- but is not limited to, damage to your equipment, to your data, personal
- injuries, financial loss or any other kinds of side effects.
-
- imageio.library is provided as-is. This means I do not guarantee that
- imageio.library is fit for any specific purpose and I do not guarantee
- any bug fixes, updates or help during error recovery.
-
- DISTRIBUTION
- imageio.library should be distributed at no charge to the end user. It may
- be included on Aminet CDs.
-
- The author retains all rights to the enclosed software. Payment is not
- required for the use of imageio.library in public domain software.
-
- For ANY COMMERCIAL APPLICATION using imageio.library, contact the author
- for further information concerning distribution.
-
- REQUIREMENTS
- A minimum of Kickstart 3.0, 68020 CPU is required to use imageio.library.
-
- COMPLIER
- imageio.library was written and compiled using CED V3.5 and SAS/C 6.58 on
- an Amiga 4000/060. CyberGuard was used to detect/correct programming
- errors.
-
- BUGS
- Should you find any bugs, please report them so that they can be fixed.
- Likewise any suggestions for improvment of the library should be
- forwarded so that they can be addressed.
-
- THANKYOUS
- Many thanks to
- Dinh Thi Kim Tuyen
- - Who makes the sky blue and the world turn. I love you, forevermore.
-
- Steve Quartly
- - For pushing me into corners I wouldn't normally go, to teach me to
- see things where I would normally give up.
-
- AUTHOR
- You can contact the author via:
- email: paulhuxham@yahoo.com
- www: http://mafeking.scouts.org.au/steeplesoftware
-
- imageio.library/--history-- imageio.library/--history--
-
- V3.2
- > Fixed a bug with file format descriptors. It was always reporting
- incorrect file formats (eg HAM6, PALETTE etc).
-
- V3.1
- > Added a global imagegeneric.h file and converted all defines across to
- the new format. If you cant be bothered changing your source code, just
- add "#define IMAGEIO_COMPAT" before you include imageio.h.
-
- > Fixed a bug with memory loading for loaders that have emulated memory
- where the file mode was not set to MODE_OLDFILE.
-
- V3.0
- > Added raw Ilbm memory support using a custom stream handler to read
- ilbm files from a source in memory.
-
- > Added raw Jpeg memory support using a jpeg.library memory stream
- facilities.
-
- > Added support for the memory stream tags. Now any file type can be
- read by imageio.library if it is sourced in memory.
-
- > Fixed a bug where a false error code was returned from FreeImage().
-
-
- V2.2
- > Added internal Ilbm support and removed internal GIF support.
-
- V2.0
- > Added GetImageTypeArray() to return an array of supported image
- formats.
-
- > Added IMG_QuerySaveable tag to determine if an image is saveable
- in a given format.
-
- > Added IMG_IsDecoded tag to determine if an image was decoded (eg UU).
-
- > Added IMG_DecodedName tag to determine the file name of the image
- (if it was decoded ).
-
- > Added WriteImageA() to save an image.
-
- > Added the uudecoding of single part uuencoded files before passing
- to an image loader. This feature can be dis/enabled by the environment
- variable: imageio.library/AllowDecoding. Set to 1 for enable, 0 to
- disable.
-
- > The temporary directory used to decode images can be set via the
- environment variable: imageio.library/DecodeTempDir. Set it to the
- directory to store temporary files. The default is T:.
-
- > Added a user preferences program so that certain image formats can be
- dis/enabled by the *USER*. A use for this is to disable the internal
- jpeg.library loader so that a ppc datatype can be used instead.
-
- > Added a new image type, IMGF_MEMORY that creates an image handle
- around an RGB buffer already in memory. See examples for more
- information.
-
- > Fixed a bug where the seek position of the file being loaded wasnt
- reset to the beginning for each file type alloc.
-
- > Added support for the decoding of base64 encoded files.
-
- > Added the IMF_WriteDecodedFile tag to WriteImage() to enable the
- storing of successfully decoded images.
-
- > Added the following tags to get information about the image handle:
- IMG_ImagePlanar, IMG_ImageChunky, IMG_ImageHAM6, IMG_ImageHalfBrite,
- IMG_ImageHAM8, IMG_Image24Bit, IMG_ImagePalette, IMG_ImageGrey,
- IMG_ImageFormat (bulk definitions of previous tags - can be passed
- directly to proof.library) and IMG_ImageDepth.
-
- V1.1
- > Fixed a bug in datatype reading, where freeing a dt object was
- attempted even if the library failed to open.
-
- V1.0
- > Initial release.
-
- imageio.library/_base64 imageio.library/_base64
-
- NAME
- base64 -- allow loading of base64 encoded files.
-
- FUNCTION
- Allows imageio.library to read images encoded by a base64 encoder.
-
- Based on code (C) Copyright 1993,1994 by Carnegie Mellon University
- All Rights Reserved.
-
- Permission to use, copy, modify, distribute, and sell this software
- and its documentation for any purpose is hereby granted without
- fee, provided that the above copyright notice appear in all copies
- and that both that copyright notice and this permission notice
- appear in supporting documentation, and that the name of Carnegie
- Mellon University not be used in advertising or publicity
- pertaining to distribution of the software without specific,
- written prior permission. Carnegie Mellon University makes no
- representations about the suitability of this software for any
- purpose. It is provided "as is" without express or implied
- warranty.
-
- CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
- THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
- FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- SOFTWARE.
-
- V1.0
- > Initial release
-
- imageio.library/_datatype imageio.library/_datatype
-
- NAME
- datatype -- allow datatype loading
-
- FUNCTION
- Allows imageio.library to read any image supported by datatypes. This is
- the default method for loading if all other methods cannot establish the
- image type.
-
- V1.0
- > Initial release
-
- imageio.library/_gif imageio.library/_gif
-
- NAME
- gif -- allow gif loading
-
- FUNCTION
- Allows imageio.library to read gif images.
-
- V1.0
- > Initial release
-
- imageio.library/_Ilbm imageio.library/_Ilbm
-
- NAME
- -- allow ilbm loading
-
- FUNCTION
- Allows imageio.library to read ilbm images.
-
- Based on ViewILBM, by Olaf `Olsen' Barthel, public domain
-
- Postal address: Olaf Barthel
- Brabeckstr. 35
- 30559 Hannover
-
- Federal Republic of Germany
-
- e-mail address: olsen@sourcery.han.de
-
- V1.0
- > Initial release
-
- imageio.library/_jpeg imageio.library/_jpeg
-
- NAME
- jpeg -- allow jpeg loading using jpeg.library
-
- FUNCTION
- Allows imageio.library to read jpeg images. A minimum of jpeg.library
- version 5.0 is required for imageio.library.
-
- V3.0
- > Fixed a bug saving greyscale images.
-
- V2.0
- > Image handles can be saved in jpeg format.
-
- V1.0
- > Initial release
-
- imageio.library/_memory imageio.library/_memory
-
- NAME
- memory -- allow memory loading
-
- FUNCTION
- Allows imageio.library to read buffers stored in memory as images.
-
- V1.0
- > Initial release
-
- imageio.library/_Superview imageio.library/_Superview
-
- NAME
- Superview -- allow loading using superview.library
-
- FUNCTION
- Allows imageio.library to read any image supported by superview.library.
-
- V1.0
- > Initial release
-
- imageio.library/_Tbcplus imageio.library/_Tbcplus
-
- NAME
- Tbc -- allow TBC+ loading
-
- FUNCTION
- Allows imageio.library to read images saved with TBCPlus.
- TBCPlus © GVP Inc.
-
- V1.0
- > Initial release
-
- imageio.library/_uu imageio.library/_uu
-
- NAME
- uu -- allow loading of uuencoded files.
-
- FUNCTION
- Allows imageio.library to read uuencoded images.
-
- V1.0
- > Initial release
-
- imageio.library/AllocImageA imageio.library/AllocImageA
-
- NAME
- AllocImageA -- Allocate an image handle
- AllocImage -- Varargs stub
-
- SYNOPSIS
- err = AllocImageA( irh, taglist )
- a0 a1
-
- err = AllocImageA( struct ImageHandle **ih, struct TagItem *taglist )
-
- err = AllocImage( irh, tag1, ... )
-
- err = AllocImage( struct ImageHandle **ih, ULONG tag1, ... )
-
- FUNCTION
- Allocates a new image read handle.
-
- Available tags:
- IMG_SrcMemStream - The source image is a segment of memory starting
- at this address.
- IMG_SrcMemStreamSize - The length of the memory based segment,
- in bytes.
- IMG_SrcFile - A BPTR to an already open AmigaDOS file.
- IMG_AllowEncoded - Dis/allow the decoding of a single part
- encoded file before passing it to the image
- loaders. Overrides the users preferences.
-
- New for version 3.0
- IMG_SrcFilename - A pointer to a path/filename. A read lock on the
- file is held until after the image has been
- read. It is then released.
-
- INPUTS
- ih - pointer to a struct ImageHandle pointer.
- taglist - pointer to a tag list specifying the image stream source and
- size.
-
- RESULT
- err - if non NULL contains an error code. (For a complete list of error
- codes, see imageio.h)
-
- WARNING
-
- BUGS
-
- SEE ALSO
- FreeImageA()
-
- imageio.library/FreeImage imageio.library/FreeImage
-
- NAME
- FreeImage -- Free an image handle
-
- SYNOPSIS
- err = FreeImage( ih )
- a0
-
- err = FreeImage( struct ImageHandle *ih )
-
- FUNCTION
- Frees an image read handle.
-
- INPUTS
- irh - pointer to a struct ImageHandle.
-
- RESULT
- err - if non NULL contains an error code. (For a complete list of error
- codes, see imageio.h)
-
- WARNING
-
- BUGS
-
- SEE ALSO
- AllocImageA()
-
- imageio.library/GetAvailWriteFormat imageio.library/GetAvailWriteFormat
-
- NAME
- GetAvailWriteFormat -- Access the list of writeable formats
-
- SYNOPSIS
- format = GetAvailWriteFormat( void **handle )
-
- ULONG GetAvailWriteFormat( void )
-
- FUNCTION
- Allows an application to find out what image formats are writeable.
-
- INPUTS
-
- handle - Is a pointer to a pointer, initially containing a NULL. Passed
- in again across multiple calls to access all list entries.
- RESULT
- format - returns an image format or NULL for end of writeable formats.
-
- WARNING
-
- BUGS
-
- SEE ALSO
-
- imageio.library/GetImageAttrsA imageio.library/GetImageAttrsA
-
- NAME
- GetImageAttrsA -- Get attributes of an image handle
- GetImageAttrs -- Varargs stub
-
- SYNOPSIS
- result = GetImageAttrsA( ih, taglist )
- a0 a1
-
- ULONG GetImageAttrsA( struct ImageHandle *ih, struct TagItem *taglist )
-
- result = GetImageAttrs( ih, tag1, ... )
-
- BOOL GetImageAttrs( struct ImageHandle *ih, ULONG tag1, ... )
-
- FUNCTION
- Retrieves information about the image handle and returns the values in
- variables passed in with the taglist.
-
- Available tags:
- IMG_Width - Returns the width of the image (ULONG).
- IMG_Height - Returns the height of the image (ULONG).
- IMG_BytesPerPixel - Returns the number of bytes for every
- pixel (ULONG).
- IMG_RowSize - Returns the width in bytes of one pixel
- row (ULONG).
- IMG_ColourSpace - Returns the type of colour space stored in the
- image buffer (see image.h for result
- codes) (UBYTE)
- IMG_ScaleNum - Return values as though scaled with this value.
- IMG_ScaleDenom - Return values as though scaled with this value.
- IMG_ImageBuffer - Return a pointer to the image buffer. Could be
- NULL if no buffer is loaded yet.
- IMG_ImageType - Return a file format type, defined in image.h
- IMG_AsciiImageType - Returns an ascii representation of the file
- format. (Not implemented)
- IMG_QuerySaveable - Query the library if the image can be saved
- in this format. See the write example for how to
- use this tag.
- IMG_IsDecoded - Return TRUE if this file is decoded from another
- file, otherwise FALSE.
- IMG_DecodedName - Get the filename of the picture. If decoded, get
- the images real name from the decoder.
-
- INPUTS
- ih - pointer to a struct ImageHandle.
- taglist - pointer to a tag list, containing the information to retrieve.
-
- RESULT
- err - returns IMGERR_NONE if successful, otherwise an error code. See
- imageio.h for error code definitions.
-
- WARNING
-
- BUGS
-
- EXAMPLE
-
- err = GetImageAttrs( ih, IMG_Width, &x, IMG_Height, &y, TAG_DONE );
-
- SEE ALSO
-
- imageio.library/GetImageTypeArray imageio.library/GetImageTypeArray
-
- NAME
- GetImageTypeArray -- Get the image type array
-
- SYNOPSIS
- result = GetImageTypeArray( void )
-
- ULONG GetImageTypeArray( void )
-
- FUNCTION
- Gets a READ ONLY pointer to the image type array. Using this array, you
- can determine if a particular image format supports certain facilities.
-
- INPUTS
-
- RESULT
- err - returns a pointer to the image type array if successful,
- otherwise NULL.
-
- WARNING
-
- BUGS
-
- SEE ALSO
-
- imageio.library/ReadImageA imageio.library/ReadImageA
-
- NAME
- ReadImageA -- Read an image stream
- ReadImage -- Varargs stub
-
- SYNOPSIS
- err = ReadImageA( ih, taglist )
- a0 a1
-
- err = ReadImageA( struct ImageHandle *ih, struct TagItem *taglist )
-
- err = ReadImage( ih, tag1, ... )
-
- err = ReadImage( struct ImageHandle **ih, ULONG tag1, ... )
-
- FUNCTION
- Reads an image stream into memory.
-
- Available tags:
- IMG_StorageHook - Calls a user specified function to store an
- imag scanline (see image.h). DO NOT pass a hook
- structure pointer here. Put a pointer to your
- function (see examples). Returning a non NULL
- value from the hook will abort a load in
- progress.
- IMG_StorageUserData - User data passed to the hook function (void *).
- IMG_ProgressHook - Calls a user specified function for the purpose
- of displaying a progress indicator (see
- imageio.h). DO NOT pass a hook structure pointer
- here. Put a pointer to your function (see
- examples). Returning a non NULL value from the
- hook will abort a load in progress.
- IMG_ProgressUserData - User data passed to the hook function (void *).
- IMG_RenderHook - Calls a user specified function to render each
- loaded scanline (see imageio.h). DO NOT pass a
- hook structure pointer here. Put a pointer to
- your function (see examples). Returning a non
- NULL value from the hook will abort a load in
- progress.
- IMG_RenderUserData - User data passed to the hook function (void *).
- IMG_ScaleNum - Scale decompressed data with this numerator.
- IMG_ScaleDenom - Scale decompressed data with this denominator.
- IMG_JPEG_DCTMethod - The DCT processing method to use for loading
- a jpeg image. Defaults to JPEG_DCT_IFAST.
- IMR_ImageBuffer - Specifies a pointer to a UBYTE that takes the
- pointer to the image buffer. You need to know the
- colourspace the image is using to actually do
- anything with this pointer.
- IMG_RGBBuffer - Create an imagehandle from this RGB buffer
- already in memory. When freeing the imagehandle,
- the buffer is not freed.
- IMG_MakeReturnedBuffer - Specify the format you want the loaded
- buffer as. (NOT IMPLEMENTED)
-
- INPUTS
- ih - pointer to a struct ImageHandle.
- taglist - pointer to a tag list.
-
- RESULT
- err - if non NULL contains an error code. (For a complete list of error
- codes, see imageio.h)
-
- WARNING
-
- BUGS
-
- SEE ALSO
- AllocImageA(), FreeImageA()
-
- imageio.library/SetImageAttrsA imageio.library/SetImageAttrsA
-
- NAME
- SetImageAttrsA -- Set attributes of an image
- SetImageAttrs -- Varargs stub
-
- SYNOPSIS
- result = SetImageAttrsA( ih, taglist )
- a0 a1
-
- ULONG SetImageAttrsA( struct ImageHandle *ih, struct TagItem *taglist )
-
- result = SetImageAttrs( ih, tag1, ... )
-
- ULONG SetImageAttrs( struct ImageHandle *ih, ULONG tag1, ... )
-
- FUNCTION
- Sets specified information from the taglist into the image.
-
- INPUTS
- ih - pointer to a struct ImageHandle.
- taglist - pointer to a tag list, containing the information to set.
-
- PFN_ProofHeight - Specifies the Height in pixels of the Proof
- image. Values range from 0 to 255. (UBYTE)
-
- RESULT
- err - returns IMGERR_NONE if successful, otherwise an error code. See
- imageio.h for error code definitions.
-
- WARNING
-
- BUGS
-
- SEE ALSO
-
- imageio.library/WriteImageA imageio.library/WriteImageA
-
- NAME
- WriteImageA -- Write an image stream
- WriteImage -- Varargs stub
-
- SYNOPSIS
- err = WriteImageA( ih, taglist )
- a0 a1
-
- ULONG WriteImageA( struct ImageHandle *ih, struct TagItem *taglist )
-
- err = WriteImage( ih, tag1, ... )
-
- ULONG WriteImage( struct ImageHandle **ih, ULONG tag1, ... )
-
- FUNCTION
- Writes an image stream in memory to a file.
-
- Available tags:
- IMG_ProgressHook - Calls a user specified function for the purpose
- of displaying a progress indicator (see
- imageio.h). DO NOT pass a hook structure pointer
- here. Put a pointer to your function (see
- examples). Returning a non NULL value from the
- hook will abort a write in progress.
- IMG_ProgressUserData - User data passed to the hook function (void *).
-
- IMG_JPEG_DCTMethod - The DCT processing method to use for saving a
- jpeg image. Defaults to JPEG_DCT_IFAST.
- IMG_JPEG_Quality - When saving, use this jpeg quality. Defaults
- to 85.
- IMG_JPEG_Progressive - Save the jpeg in progressive format. Defaults
- to FALSE.
- IMG_WriteDecodedFile - Store the image into the pathfile passed in,
- ONLY if the file was decoded (char *). Will
- NOT overwrite existing files. This IGNORES any
- scaled loading settings and stores the
- original file!
-
- INPUTS
- ih - pointer to a struct ImageHandle.
- taglist - pointer to a tag list.
-
- RESULT
- err - if non NULL contains an error code. (For a complete list of error
- codes, see imageio.h)
-
- WARNING
-
- BUGS
-
- SEE ALSO
- AllocImageA(), FreeImageA(), ReadImageA()
-
-